<div class="loginConnect">
	<div class="f-auth-tip">您也可以用合作网站账号登录：</div>
	<ul class="f-auth-type">
		<li><a openWindowHeight="530" openWindowURL="http://<{php}>echo Site::domain('member');<{/php}>/cooperate/thirdlogin/taobao" openWindowWidth="415" class="connect_taobao" CaTag="connect_taobao" title="用淘宝网帐号登录" href="javascript:void(0);"></a></li>
        <li><a title="用QQ号登录" openWindowHeight="350" openWindowWidth="450" class="connect_qq" CaTag="connect_qq" openWindowURL="http://<{php}>echo Site::domain('member');<{/php}>/cooperate/thirdlogin/qq" href="javascript:void(0);"></a></li>
		<li><a openWindowHeight="330" openWindowWidth="700" openWindowURL="http://<{php}>echo Site::domain('member');<{/php}>/cooperate/thirdlogin/renren" title="用人人网帐号登录" class="connect_renren" CaTag="connect_renren" href="javascript:void(0);"></a></li>
        <li><a openWindowHeight="300" openWindowURL="http://<{php}>echo Site::domain('member');<{/php}>/cooperate/thirdlogin/baidu" openWindowWidth="560" class="connect_baidu" CaTag="connect_baidu" title="用百度帐号登录" href="javascript:void(0);"></a></li>
	</ul>
</div>


<script type="text/javascript">
	var Icons=function(){
		this._init.apply(this,arguments);
	};
	Icons.prototype={
			_containerSelector:null,
			_labelSelector:null,
			//初始化方法
		    _init:function(containerSelector){
		        var self=this;
		        self._containerSelector=containerSelector;
		        self._labelSelector=containerSelector+" >em";
		        //self.isShowBtn();
		        self._bindEvent();
	
		    },
		    //隐藏Label
		    hideLabel:function($target,callBack){
		    	var self=this;
		    	 $target.animate({
		    			  width:'0px'
		    		  },1000,function(){
		    			  //$(event.currentTarget).find("span").css('display','none');
		    			  callBack();
		    		  });
	
		    },
		    //显示Label
		    showLabel:function($target,callBack){
		      var self=this;
	
			  $target.animate({
				  width:'65px'
			  },1000,function(){
				  callBack();
				  $target.css('display','inline');
	
			  });
		   },
		   isShowBtn:function(){
			   var self=this;
			   var $parentContener=jQuery(self._containerSelector);
			   var parentContenerWidth=$parentContener[0].offsetWidth;
			   var $container=jQuery(self._containerSelector+">p").css("width","auto").appendTo("body");
			   var containerWidth=$container[0].offsetWidth;
	
			   $container.css("width","80%").prependTo($parentContener);
			   jQuery(self._containerSelector+" em").prependTo($parentContener);
			   if(parentContenerWidth>=containerWidth){
				   jQuery(self._containerSelector+"> .btn").addClass("noDis");
				   $container.css("width","100%")
			   }
	
		   },
		   openWindow:function(url,openWindowWidth,openWindowHeight){
			   var self=this;
			   var thirdPart=window.open(url,"connect_window_open",'top=0, left=0,height='+openWindowHeight+',width='+openWindowWidth+',location=no,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,resizable=yes');
		   },
		   //绑定事件
		   _bindEvent:function(){
			   var self=this;
	
			   jQuery(self._containerSelector).bind("click",function(event){
				   var $target= jQuery(event.target);
					  var url=$target.closest("a")[0].getAttribute("openWindowURL");
	                  var openWindowWidth=$target.closest("a")[0].getAttribute("openWindowWidth");
	                  var openWindowHeight=$target.closest("a")[0].getAttribute("openWindowHeight");
	                  var CaTag=$target.closest("a")[0].getAttribute("CaTag");
					  if($target.hasClass("btnLeft")){
						  self.hideLabel(jQuery(self._labelSelector),function(){
							  $target.removeClass("btnLeft");
							  $target.addClass("btnRight");
						  });
	
					  }else if($target.hasClass("btnRight")){
						  self.showLabel(jQuery(self._labelSelector),function(){
							  $target.removeClass("btnRight");
							  $target.addClass("btnLeft");
						  });
	
					  }else if(url!=null&&url!=""){
						  self.openWindow(url,openWindowWidth,openWindowHeight);
					  }
			   });
	
		   }
	};
	var icons=new Icons(".loginConnect");

	function connect_callback()
	{
		window.location.assign('http://<{php}>echo Site::domain('member');<{/php}>');
	}
</script>
